-
Notifications
You must be signed in to change notification settings - Fork 712
make cabal less chatty w.r.t. project files in use #10940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
d2194da
to
45dcb0d
Compare
4501f79
to
cc63eaf
Compare
528cf85
to
fae5b09
Compare
Are you still seeing the problems in the CI? As in
|
@Mikolaj yes, that's why the pipelines are currently failing I believe |
I don't think this
|
Oh my, I had a feeling I lost my way in the output... I wonder if in the future we could try to avoid generating +'s like the one that confused me. The actual failure is expected and will be fixed. The reason it wasn't fixed before is that when I ran the testsuite locally --accept'ing the necessary changes, this test failed with an exception in ProjectaOrchestration.hs. This is a discrepancy between my local setup and CI that probably deserves a separate ticket but let's not get bogged down by this. Thanks for unlocking me! Now I can probably finish fixing tests at least. |
2f4b051
to
df7fc70
Compare
df7fc70
to
5c90821
Compare
I don't see this test in my tree — is it a ghost? |
Exactly: that one isn't merged yet, so there shouldn't be tests from there on my branch... I'm having trouble understanding this:
@Bodigrim thanks for your comments. I'll incorporate them when/if I finish my fight with the test suite. Currently, it's not clear who will come out as a victor, I or it... |
I've never really understood all the normalization stuff, tbh. And I think I poked at it once and found it a bit hacky. |
Okay, test suite issues aside, there's an actual technical question: if we want to print project files out only when My first idea was to look at the path to project files, 'cause I thought their paths would be stored relative to CWD but that's of course not the case --- their paths are relative to the project root (it makes sense: otherwise we'd have to reconfigure everytime we change directory we run So, I'm currently looking for ideas on how to tell that |
all right, looks like |
bdcf9aa
to
ab84f4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output from cabal-install is chatty.
Here's the preamble before the compilation starts. The project info is a small fraction of that:
cabal build all --enable-tests --enable-benchmarks
Warning: this is a debug build of cabal-install with assertions enabled.
Configuration is affected by the following files:
- cabal.project
Warning: The package list for 'hackage.haskell.org' is 18 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Build profile: -w ghc-9.12.2 -O1
In order, the following will be built (use -v for more details):
- data-default-0.8.0.1 (lib) (requires build)
- primitive-0.9.1.0 (lib) (requires build)
- regex-tdfa-1.3.2.4 (lib) (requires build)
- unix-2.8.7.0 (lib:unix) (requires build)
- data-default-class-0.2.0.0 (lib) (requires build)
- vector-0.13.2.0 (lib) (requires build)
- scientific-0.3.8.0 (lib) (requires build)
- integer-conversion-0.1.1 (lib) (requires build)
- semaphore-compat-1.0.0 (lib) (requires build)
- file-io-0.1.5 (lib) (requires build)
- directory-ospath-streaming-0.2.2 (lib) (requires build)
- base-compat-0.13.1 (lib) (requires build)
- vector-th-unbox-0.2.2 (lib) (requires build)
- vector-binary-instances-0.2.5.2 (lib) (requires build)
- nothunks-0.2.1.1 (lib) (requires build)
- math-functions-0.3.4.4 (lib) (requires build)
- indexed-traversable-instances-0.1.2 (lib) (requires build)
- bitvec-1.1.5.0 (lib) (requires build)
- attoparsec-0.14.4 (lib) (requires build)
- text-iso8601-0.1.1 (lib) (requires build)
- directory-1.3.9.0 (lib:directory) (requires build)
- mwc-random-0.15.2.0 (lib) (requires build)
- witherable-0.5 (lib) (requires build)
- semialign-1.3.1 (lib) (requires build)
- vector-algorithms-0.9.1.0 (lib) (requires build)
- parsers-0.12.12 (lib) (requires build)
- temporary-1.3 (lib) (requires build)
- tar-0.6.4.0 (lib:tar-internal) (requires build)
- silently-1.2.5.4 (lib) (requires build)
- process-1.6.26.1 (lib:process) (requires build)
- alex-3.5.3.0 (exe:alex) (requires build)
- Glob-0.10.2 (lib) (requires build)
- aeson-2.2.3.0 (lib) (requires build)
- dense-linear-algebra-0.1.0.0 (lib) (requires build)
- tar-0.6.4.0 (lib) (requires build)
- typed-process-0.2.13.0 (lib) (requires build)
- optparse-applicative-0.18.1.0 (lib) (requires build)
- open-browser-0.4.0.0 (lib) (requires build)
- hsc2hs-0.68.10 (exe:hsc2hs) (requires build)
- githash-0.1.7.0 (lib) (requires build)
- echo-0.1.4 (lib) (requires build)
- Cabal-syntax-3.15.0.0 (lib) (first run)
- Cabal-syntax-3.12.1.0 (lib) (requires build)
- tree-diff-0.3.4 (lib) (requires build)
- statistics-0.16.3.0 (lib) (requires build)
- tasty-1.5.3 (lib) (requires build)
- zlib-0.7.1.0 (lib) (requires build)
- terminal-size-0.3.4 (lib) (requires build)
- network-3.2.7.0 (lib:network) (requires build)
- lukko-0.1.2 (lib) (requires build)
- Cabal-3.15.0.0 (lib) (first run)
- Cabal-3.12.1.0 (lib) (requires build)
- solver-benchmarks-3 (lib) (first run)
- tasty-quickcheck-0.11.1 (lib) (requires build)
- tasty-hunit-0.10.2 (lib) (requires build)
- tasty-golden-2.3.5 (lib) (requires build)
- tasty-expected-failure-0.12.3 (lib) (requires build)
- tasty-bench-0.3.5 (lib) (requires build)
- cabal-validate-1.0.0 (exe:cabal-validate) (first run)
- network-wait-0.2.0.0 (lib) (requires build)
- hackage-security-0.6.3.0 (lib) (first run)
- HTTP-4000.4.1 (lib) (requires build)
- cabal-install-solver-3.15.0.0 (lib) (first run)
- Cabal-tree-diff-3.15.0.0 (lib) (first run)
- Cabal-tests-3 (test:custom-setup-tests) (first run)
- Cabal-tests-3 (lib) (first run)
- Cabal-hooks-3.16 (lib) (first run)
- Cabal-QuickCheck-3.15.0.0 (lib) (first run)
- solver-benchmarks-3 (exe:hackage-benchmark) (first run)
- Cabal-described-3.15.0.0 (lib) (first run)
- solver-benchmarks-3 (test:unit-tests) (first run)
- Cabal-tests-3 (test:rpmvercmp) (first run)
- Cabal-tests-3 (test:no-thunks-test) (first run)
- Cabal-tests-3 (test:check-tests) (first run)
- cabal-benchmarks-3 (test:cabal-benchmarks) (first run)
- cabal-install-solver-3.15.0.0 (test:unit-tests) (first run)
- cabal-install-3.15.0.0 (lib) (first run)
- Cabal-tests-3 (test:parser-tests) (first run)
- Cabal-tests-3 (test:hackage-tests) (first run)
- cabal-testsuite-3 (lib:cabal-testsuite, exe:cabal-tests, exe:setup, exe:test-runtime-deps) (first run)
- buildinfo-reference-generator-0 (exe:buildinfo-reference-generator) (first run)
- Cabal-tests-3 (test:unit-tests) (first run)
- cabal-install-3.15.0.0 (test:unit-tests) (first run)
- cabal-install-3.15.0.0 (test:mem-use-tests) (first run)
- cabal-install-3.15.0.0 (test:long-tests) (first run)
- cabal-install-3.15.0.0 (test:integration-tests2) (first run)
- cabal-install-3.15.0.0 (exe:cabal) (first run)
Starting data-default-0.8.0.1 (lib)
Starting primitive-0.9.1.0 (lib)
Starting regex-tdfa-1.3.2.4 (lib)
Starting unix-2.8.7.0 (all, legacy fallback: build-type is Configure)
Building data-default-0.8.0.1 (lib)
Building regex-tdfa-1.3.2.4 (lib)
Building primitive-0.9.1.0 (lib)
Installing data-default-0.8.0.1 (lib)
Completed data-default-0.8.0.1 (lib)
Starting data-default-class-0.2.0.0 (lib)
Building data-default-class-0.2.0.0 (lib)
Installing data-default-class-0.2.0.0 (lib)
Completed data-default-class-0.2.0.0 (lib)
Building unix-2.8.7.0 (all, legacy fallback: build-type is Configure)
Installing primitive-0.9.1.0 (lib)
Completed primitive-0.9.1.0 (lib)
Starting integer-conversion-0.1.1 (lib)
Starting scientific-0.3.8.0 (lib)
Starting vector-0.13.2.0 (lib)
Building integer-conversion-0.1.1 (lib)
Building scientific-0.3.8.0 (lib)
Building vector-0.13.2.0 (lib)
Installing integer-conversion-0.1.1 (lib)
Completed integer-conversion-0.1.1 (lib)
Starting text-iso8601-0.1.1 (lib)
Building text-iso8601-0.1.1 (lib)
Installing scientific-0.3.8.0 (lib)
Completed scientific-0.3.8.0 (lib)
Starting attoparsec-0.14.4 (lib)
Building attoparsec-0.14.4 (lib)
Installing text-iso8601-0.1.1 (lib)
Completed text-iso8601-0.1.1 (lib)
Installing regex-tdfa-1.3.2.4 (lib)
Completed regex-tdfa-1.3.2.4 (lib)
Installing unix-2.8.7.0 (all, legacy fallback: build-type is Configure)
Completed unix-2.8.7.0 (all, legacy fallback: build-type is Configure)
Starting semaphore-compat-1.0.0 (lib)
Starting file-io-0.1.5 (lib)
Starting directory-ospath-streaming-0.2.2 (lib)
Starting base-compat-0.13.1 (lib)
Building semaphore-compat-1.0.0 (lib)
Building file-io-0.1.5 (lib)
Building directory-ospath-streaming-0.2.2 (lib)
Building base-compat-0.13.1 (lib)
Installing semaphore-compat-1.0.0 (lib)
Installing file-io-0.1.5 (lib)
Completed semaphore-compat-1.0.0 (lib)
Completed file-io-0.1.5 (lib)
Starting directory-1.3.9.0 (all, legacy fallback: build-type is Configure)
Installing directory-ospath-streaming-0.2.2 (lib)
Completed directory-ospath-streaming-0.2.2 (lib)
Building directory-1.3.9.0 (all, legacy fallback: build-type is Configure)
Installing base-compat-0.13.1 (lib)
Completed base-compat-0.13.1 (lib)
Installing directory-1.3.9.0 (all, legacy fallback: build-type is Configure)
Completed directory-1.3.9.0 (all, legacy fallback: build-type is Configure)
Starting temporary-1.3 (lib)
Starting silently-1.2.5.4 (lib)
Starting Glob-0.10.2 (lib)
Starting process-1.6.26.1 (all, legacy fallback: build-type is Configure)
Starting tar-0.6.4.0 (lib:tar-internal)
Starting alex-3.5.3.0 (exe:alex)
Building temporary-1.3 (lib)
Building silently-1.2.5.4 (lib)
Building Glob-0.10.2 (lib)
Building alex-3.5.3.0 (exe:alex)
Building tar-0.6.4.0 (lib:tar-internal)
Installing silently-1.2.5.4 (lib)
Installing temporary-1.3 (lib)
Completed silently-1.2.5.4 (lib)
Completed temporary-1.3 (lib)
Building process-1.6.26.1 (all, legacy fallback: build-type is Configure)
Installing Glob-0.10.2 (lib)
Completed Glob-0.10.2 (lib)
Installing attoparsec-0.14.4 (lib)
Installing process-1.6.26.1 (all, legacy fallback: build-type is Configure)
Completed attoparsec-0.14.4 (lib)
Starting parsers-0.12.12 (lib)
Completed process-1.6.26.1 (all, legacy fallback: build-type is Configure)
Starting open-browser-0.4.0.0 (lib)
Starting typed-process-0.2.13.0 (lib)
Starting githash-0.1.7.0 (lib)
Starting hsc2hs-0.68.10 (exe:hsc2hs)
Starting echo-0.1.4 (lib)
Starting optparse-applicative-0.18.1.0 (lib)
Installing tar-0.6.4.0 (lib:tar-internal)
Building parsers-0.12.12 (lib)
Building githash-0.1.7.0 (lib)
Building typed-process-0.2.13.0 (lib)
Completed tar-0.6.4.0 (lib:tar-internal)
Starting tar-0.6.4.0 (lib)
Building hsc2hs-0.68.10 (exe:hsc2hs)
Building open-browser-0.4.0.0 (lib)
Building optparse-applicative-0.18.1.0 (lib)
Building echo-0.1.4 (lib)
Installing alex-3.5.3.0 (exe:alex)
Completed alex-3.5.3.0 (exe:alex)
Warning: this is a debug build of cabal-install with assertions enabled.
Configuring library for Cabal-syntax-3.15.0.0...
Starting Cabal-syntax-3.12.1.0 (lib)
Installing open-browser-0.4.0.0 (lib)
Installing echo-0.1.4 (lib)
Building tar-0.6.4.0 (lib)
Installing tar-0.6.4.0 (lib)
Building Cabal-syntax-3.12.1.0 (lib)
Warning: this is a debug build of cabal-install with assertions enabled.
Preprocessing library for Cabal-syntax-3.15.0.0...
Completed open-browser-0.4.0.0 (lib)
Building library for Cabal-syntax-3.15.0.0...
Installing githash-0.1.7.0 (lib)
Completed echo-0.1.4 (lib)
As explained in the ticket, the problem gets exacerbated on repeated rebuilds, when Cabal has little or nothing else to say. |
I see in the ticket that opinions were mixed. With this pull request, project output is being stomped on for every That being said, whether the build is "up to date" or not, it seems reasonable to always skip reporting that |
Yes, this idea crossed my mind once as well. It needs a bit of research. I'm also curious what other people think... |
One issue here is timing. We're close to cutting the 3.16 branch. I'd love to fix the excessive output for the release, as in this PR, and revisit the issue in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we please hold off merging this until we get the "configuration is affected by" message repeats fixed?
Downloading the latest package list from test-local-repo | ||
# cabal v2-build | ||
Configuration is affected by the following files: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This repeated output is something I was working on and I think #10688 was a step in that direction. @ulysses4ever could we try to fix this first, while it still manifests in the tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can set a dependency in the PR description to ensure it's not merged until the dependency PR is (Depends-on: whatever
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think improving output across commands is a far more general issue than what this PR tackles.
If |
I'd prefer to merge this ASAP because for all purposes it's an improvement on the current behavior imo. And as I say above, the time it's running out for this to get into 3.16 (without additional backporting work). |
As the author of the issue, I'd love to see the fix merged in time for 3.16 which I imagine is indeed fairly soon, given the timeline for GHC 9.14. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in the release.
My inclination would be let's merge and let's amend it radically afterwards, as needed, e.g., to rebase it on top of #10688. |
Having said that, technically #10688 is likely to merge first, in less that 2 days. Would that delay this here PR significantly? |
#10688 was approved two weeks ago. I rebased it yesterday. Should we attach the label merged delay passed to it? |
If @ulysses4ever agrees to rebase on top of #10688, then let's indeed speed up its merge. If @ulysses4ever prefers to do this the other way around and you (@philderbeast) agree, let's instead label this here PR with Which one will it be? |
I'm happy to rebase. Thanks everyone! |
I've set |
And it's merged! @philderbeast, thank you. :) |
597d810
to
0977e83
Compare
this branch is rebased now but the PR won't merge because @philderbeast "requested changes" |
@philderbeast: could we have your ban lifted? :) Actually, assuming you are fine with it and in the interest of time, let me lift it myself, but please correct me, if I got the situation wrong. |
I understand this no longer applies after the other PR was merged. Please correct me if not.
fix #10885
Note
Depends-On: #10684 for the fix for duplicate project notices
After #10507, cabal prints out what project files are in use on every run.
This looked too noisy for some users (#10885). In this patch, we implement a more nuanced
strategy: print out this info only when cabal is run below the root project directory.
As before, you can get this information uncoditionally if run in the verbose mode.
Bonus: we now also print the porject root directory along with the file names.
Before, we only printed, say,
cabal.project
, but it wasn't clear where this file iscoming from (can be enywhere up the directory tree).
The change tries to avoid confusion when cabal picks up stray project files in
ancestor directories, see discussion in #7930.
The diff in tests is big but it should mostly just undo the changes from #10507.
Manual QA
cabal init -nm --lib
.echo 'packages: .' > cabal.project
cabal build all --dry
-- expect NO message about project files.cd src
and runcabal
again just as in the previous step -- expect a message aboutcabal.project
.Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significant
in the changelog file.